package djrain.lilochat.client;

import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.util.Locale;

import android.content.Context;
import android.location.Address;
import android.location.Geocoder;
import djrain.lib.ToastEx;

public class LiloGeocoder
{
	Geocoder geocoder;
	List<Address> addresss = new ArrayList<Address>();
	private Context mContext;

	public LiloGeocoder(Context context)
	{
		mContext = context;
		geocoder = new Geocoder(context, Locale.KOREA);
	}

	public void getAddress(double[] lalo)
	{
		try
		{
			addresss = geocoder.getFromLocation(lalo[0], lalo[1], 1);
		}
		catch (IOException e)
		{
			e.printStackTrace();
		}
		ToastEx.makeText(mContext, "LiloGeocoder getAddre:" + addresss);
	}
}
